package users;

import java.util.Observable;
import java.util.Observer;

import javax.swing.JFrame;

public class UserPermissionsEditFrame extends JFrame implements Observer
{
    private static final long serialVersionUID = 1L;
    private UserGroup userGroup;
    
    public UserPermissionsEditFrame(UserGroup userGroup)
    {
        this.userGroup = userGroup;
        userGroup.addObserver(this);
    }

    @Override
    public void update(Observable o, Object arg)
    {
        getContentPane().removeAll();
        getContentPane().add(new UserPermissionEditPanel(userGroup));
        revalidate();
    }

}
